package com.xlhj.mq.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.annotation.EnableJms;

import javax.jms.Queue;

/**
 * @ClassName MQConfig
 * @Description activemq队列配置类
 * @Author liucaijing
 * @Date 2020/11/19 22:23
 * @Version 1.0
 */
@Configuration
@EnableJms
public class MQConfig {

    @Value("${activemq.queueName}")
    private String queueName;

    @Bean
    public Queue queue() {
        return new ActiveMQQueue(queueName);
    }
}
